<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工资管理系统</title>
    <link rel="stylesheet" href="../../../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../css/public.css" media="all">
</head>
<body>


<div class="layuimini-container">
    <div class="layuimini-main">

<!--        <form class="layui-form" action="" style="padding:20px;">-->
<!--            <div style="text-align: center;margin: 10px 10px 20px 30px;line-height: 50px">-->
<!--                <label class="layui-row" id="sel_state" style="font-family: 仿宋; font-size: 20px; color: #000000">加载中...</label>-->
<!--            </div>-->
<!--            <div class="layui-form-item">-->
<!--                <label class="layui-form-label">器材ID:</label>-->
<!--                <div class="layui-input-inline">-->
<!--                    <input type="text" name="academynum" placeholder="请输入" autocomplete="off" class="layui-input" id="academylist">-->
<!--                </div>-->
<!--                <div class="layui-input-inline">-->
<!--                    <button type="submit" class="layui-btn layui-btn-primary" lay-submit  lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>-->
<!--                </div>-->
<!--            </div>-->
<!--        </form>-->


        <div class="layui-btn-container">
        </div>

        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter">

<!--            <script type="text/html" id="currentTableBar">-->
<!--                <a class="layui-btn layui-btn-xs data-count-sel" lay-event="del">删除</a>-->
<!--            </script>-->

        </table>
    </div>
</div>

<script src="../../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="../../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.use(['table', 'form', 'tableSelect'], function () {
        var $ = layui.jquery,
            table = layui.table,
            form = layui.form,
            tableSelect = layui.tableSelect;


    layui.use(['table', 'form'], function () {
        //开始使用

        var $ = layui.jquery,
            form = layui.form,
            table = layui.table,
            layuimini = layui.layuimini;


        var userInfo = layui.data('userInfo');

        //加载信息
        table.render({
            elem: '#currentTableId',
            url: 'http://localhost:8080/SalarymanageController/SelectSalaryAll',
            toolbar: '#toolbarDemo',
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [[
                {type: "checkbox", minwidth: 50, fixed: "left"},
                {field: 'smid', width: 110, title: '工资操作ID'},
                {field: 'sm_did', width: 120, title: '医生ID'},
                {field: 'sm_wid', width: 80, title: '员工ID'},
                {field: 'smmoney', width: 120, title: '工资'},
                {field: 'smdate', width: 200, title: '发放工资日期'},
                // {field: 'sm_widmanger', width: 140, title: '操作人员'},
                // {title: '操作', width: 150, templet: '#currentTableBar', fixed: "right", align: "center"}
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 15,
            page: true,

        });
        //
        // //删除
        // table.on('tool(currentTableFilter)', function (obj) {
        //     if (obj.event === 'del') {
        //         var data = obj.data;  //得到修改后的值
        //         $.ajax({
        //             url:'http://localhost:8080/equipment/delEquipmentById?meid='+data['meid'],
        //             method:'post',
        //             data:data.field,
        //             dataType:'JSON',
        //             success:function(res){
        //                 if(res.code==='0'){
        //                     parent.closeIframe("删除成功!");
        //                 }
        //                 else
        //                     alert(res['msg']);
        //             },
        //             error: function(XMLHttpRequest, textStatus, errorThrown) {
        //                 alert("删除失败!");
        //             }
        //         }) ;
        //         table.reload('currentTableId', {
        //         }, 'data');
        //         return false;
        //     }
        // });




    //     // 监听修改操作
    //     $(".data-update-btn").on("click", function () {
    //
    //         var index = layer.open({
    //             title: '修改器材',
    //             type: 2,
    //             shade: 0.2,
    //             maxmin:true,
    //             shadeClose: true,
    //             area: ['100%', '100%'],
    //             content: './operation/update_cur.html',
    //         });
    //         $(window).on("resize", function () {
    //             layer.full(index);
    //         });
    //
    //         return false;
    //     });
    });

    });
</script>
</body>
</html>